import request from '@/utils/request'

// 查询探针项目列表
export function listProbeProject(query) {
  return request({
    url: '/system/probeProject/list',
    method: 'get',
    params: query
  })
}

// 查询探针项目详细
export function getProbeProject(id) {
  return request({
    url: `/system/probeProject/${id}`,
    method: 'get'
  })
}

// 新增探针项目
export function addProbeProject(data) {
  return request({
    url: '/system/probeProject',
    method: 'post',
    data: data
  })
}

// 修改探针项目
export function updateProbeProject(data) {
  return request({
    url: '/system/probeProject',
    method: 'put',
    data: data
  })
}

// 删除探针项目
export function delProbeProject(id) {
  return request({
    url: '/system/probeProject/' + id,
    method: 'delete'
  })
}
// 查询人员项目数
export function getProjectCount() {
  return request({
    url: '/system/probeProject/projectProbeInfoCount',
    method: 'get'
  })
}
// 根据用户id查询探针项目列表
export function getProbeProjectByUserId(id) {
  return request({
    url: `/system/probeProject/userProjectList/${id}`,
    method: 'get'
  })
}
// 上传需求文件
export function uploadFile(data,config = {}) {
  return request({
    url: '/common/upload',
    method: 'post',
    data: data,
    headers: config.headers || {}
  })
}
